Skip to main content

LeaseCompany_Stock Tables

The leaseCompany_stock_changelog and leaseCompany_stock_latest tables stores the stock details for all lease companies, including allocation, vehicle information, notifications, and associated customer/contract data.


πŸ”Ή Standard Columns​

Column NameData TypeNullableDescription
document_nameSTRINGYESFirestore document path reference
document_event_idSTRINGYESUnique identifier for the document event
document_timestampTIMESTAMPYESTimestamp of the document modification/creation
document_operationSTRINGYESType of document operation (e.g., INSERT, UPDATE, DELETE)
document_idSTRINGYESUnique document ID in Firestore
stockIdSTRINGYESUnique ID for the stock record
addedByUserBOOLYESWhether the record was manually added by a user
addedByUserIdSTRINGYESID of the user who added the record
argicCodeSTRINGYESInternal or classification code
assetIdSTRINGYESID of the physical asset
capidSTRINGYESCAP ID used for valuation or classification
colourSTRINGYESColour of the vehicle
fuelTypeSTRINGYESType of fuel
isRFLSupplierManagedBOOLYESIf the Road Fund Licence is managed by supplier
makeCodeSTRINGYESCode representing the make
modelCodeSTRINGYESCode representing the model
make.labelSTRINGYESLabel/name of the make
modelSTRINGYESVehicle model name
registrationDateTIMESTAMPYESDate of vehicle registration
rflRenewalDateSTRINGYESDate for RFL renewal
motDueDateTIMESTAMPYESMOT due date
vehicleEndDateSTRINGYESEnd date of the vehicle’s service
vehicleTypeSTRINGYESType/classification of the vehicle
vinSTRINGYESVehicle Identification Number
vrmSTRINGYESVehicle Registration Mark
variantSTRINGYESVariant of the model
carClassSTRINGYESClass/category of the car
assetNumberSTRINGYESNumber assigned to the asset
departmentCodeSTRINGYESCode of the department
branchSTRINGYESBranch code
groupSTRINGYESGroup the vehicle belongs to
dailyLicenceCheckReportEmailSTRINGYESEmail used for daily license check reports
customerAlertEmailSTRINGYESEmail address for customer alerts
vehicleNotesSTRINGYESNotes related to the vehicle
addedToOECListBOOLYESWhether added to the OEC list
independentBOOLYESFlag for independent supplier
franchiseBOOLYESFranchise flag
mobileBOOLYESIf mobile support is available
serviceProgramIncludedFlagBOOLYESWhether service program is included
schemeDataRefSTRINGYESReference to scheme data
authorityNotesSTRINGYESNotes related to vehicle authority or use
warrantyExpiryDateTIMESTAMPYESExpiry date of the warranty
warrantyParameterMileageSTRINGYESParameter to determine mileage warranty
vrmLookedUpBOOLYESHas Vrm look up been performed for the stock

πŸ”Έ Struct Columns​

addedTimeStamp​

Column NameData TypeNullableDescription
_secondsINT64YESSeconds part of timestamp
_nanosecondsINT64YESNanoseconds part of timestamp

ancillaryEquipment​

Column NameData TypeNullableDescription
craneBOOLYESIf crane is included
fridgeBOOLYESIf fridge is included
tailLiftBOOLYESIf tail lift included

Notifications​

  • carHealthCheckNotification

  • lcvHealthCheckNotification

  • mileageNotification

  • motReminderNotification

  • oilCheckNotification

  • serviceManagerNotification

Column NameData TypeNullableDescription
lastSentTIMESTAMPYESWhen notification was last sent
lastSentTimestampTIMESTAMPYESTimestamp of last notification

customer​

Column NameData TypeNullableDescription
costCentreSTRINGYESCost center for the customer
customerAccountNumberSTRINGYESCustomer account number
customerNameSTRINGYESName of the customer
customerRechargeLimitSTRUCTYESRecharge limit info in multiple formats: masked : (STRING), raw : (FLOAT), value : (FLOAT)
customerReferralLimitSTRUCTYESReferral limit info in multiple formats: masked : (STRING), raw : (FLOAT), value : (FLOAT)
invoiceCentreSTRINGYESInvoice center location

leaseCompanyDetails​

Column NameData TypeNullableDescription
idSTRINGYESLease company ID
nameSTRINGYESLease company name

vehicleContract​

Column NameData TypeNullableDescription
contractStartDateTIMESTAMPYESWhen the contract starts
contractEndDateTIMESTAMPYESWhen the contract ends
vehicleProductSTRINGYESType of vehicle contract product
smrBOOLYESIf smr included
tyresBOOLYESIf tyres included
rentalBOOLYESIf rental included
glassBOOLYESIf glass included
accidentManagementBOOLYESIf accident management included
breakdownBOOLYESIf breakdown included
insuranceBOOLYESIf insurance included
manualOverrideBOOLYESIf manually overridden
serviceScheduleSTRINGYESService Schedule Term
assetNumberSTRINGYESNumber of the asset

latestAllocation​

Column NameData TypeNullableDescription
driverDetailsRECORDYESDetails of the allocated driver
driverDetails.driverIdSTRINGYESID of the driver
driverDetails.driverNameSTRINGYESName of the driver
driverDetails.driverTitleSTRINGYESTitle of the driver
driverDetails.subCustomerIdSTRINGYESAssociated sub-customer ID
endDateTIMESTAMPYESAllocation end date
isActiveBOOLEANYESWhether the allocation is active
startDateTIMESTAMPYESAllocation start date

smrBudget​

Column NameData TypeNullableDescription
maskedSTRINGYESMasked value of the budget
rawINTEGERYESRaw value of the budget
valueINTEGERYESFinal value of the budget

vrmLookup​

Column NameData TypeNullableDescription
isValidBOOLEANYESIndicates if the VRM is valid
lookUpProviderSTRINGYESProvider of the VRM lookup
maintainedSTRINGYESMaintenance status
responseRECORDYESResponse record from lookup
response.colourSTRINGYESColour of the vehicle
response.fuelTypeSTRINGYESFuel type of the vehicle
response.makeRECORDYESMake details of the vehicle
response.make.labelSTRINGYESLabel of the make
response.make.modelSTRINGYESModel of the vehicle
response.make.registrationDateSTRINGYESRegistration date of the vehicle
response.make.vehicleCategoryDescriptionSTRINGYESDescription of the vehicle category
response.vehicleTypeRECORDYESType of vehicle
response.vehicleType.indexINTEGERYESIndex of the vehicle type
response.vehicleType.labelSTRINGYESLabel of the vehicle type
response.vehicleType.typeSTRINGYESType name
response.vehicleType.valueSTRINGYESValue representation of the vehicle type
vinSTRINGYESVehicle Identification Number
sourceSTRINGYESSource of the data
statusSTRINGYESStatus of the VRM lookup
timestampTIMESTAMPYESTimestamp of the lookup
vrmSTRINGYESVehicle Registration Mark

spendToDate​

Column NameData TypeNullableDescription
maskedSTRINGYESMasked spend value
rawFLOATYESRaw spend value
valueINTEGERYESFinal spend value

warrantyMileage​

Column NameData TypeNullableDescription
warrantyMileage.maskedSTRINGNULLABLEMasked value
warrantyMileage.rawFLOATNULLABLERaw mileage value

warrantyMonths​

Column NameData TypeNullableDescription
warrantyMonths.maskedSTRINGNULLABLEMasked value
warrantyMonths.rawFLOATNULLABLERaw months value

services​

Column NameData TypeNullableDescription
services.accidentManagementBOOLEANYESWhether accident management is included
services.breakdownBOOLEANYESWhether breakdown service is provided
services.glassBOOLEANYESWhether glass repair/replacement is covered
services.insuranceBOOLEANYESIndicates if insurance is included
services.rentalBOOLEANYESIndicates if rental services are provided
services.smrBOOLEANYESIndicates if service, maintenance, and repair is included
services.tyresBOOLEANYESIndicates if tyre services are provided

policy​

Column NameData TypeNullableDescription
policy.policyNumberSTRINGYESThe unique number of the policy
policy.policyTermSTRINGYESThe term/duration of the policy
policy.productTypeSTRINGYESType of insurance product or coverage

πŸ”Έ Array Columns​

activeAllocatedDrivers​

Array of STRUCT

Column NameData TypeNullableDescription
driverIdSTRINGYESUnique ID of the driver
driverNameSTRINGYESName of the driver
driverTitleSTRINGYESTitle or role of the driver
endDateINT64YESEnd date in epoch seconds
startDateINT64YESStart date in epoch seconds
subCustomerIdSTRINGYESSub-customer to which the stock is linked to

visnSpendToDate​

Array of STRUCT

Column NameData TypeNullableDescription
amountSTRUCTYESAmount fields in multiple formats: masked : (STRING), raw : (FLOAT), value : (FLOAT)
enquiryIdSTRINGYESEnquiry identifier (e.g., qhsZoHgBdz0fWJWxyKLD)
invoiceDateSTRUCTYESDate of invoice: _seconds: (INT64), _nanoseconds: (INT64)
invoiceNumberSTRINGYESInvoice number
creditDateSTRUCTYESCredit transaction date: _seconds: (INT64), _nanoseconds: (INT64)

branchHistory​

Column NameData TypeNullableDescription
startTimestampINTEGERYESStart timestamp (epoch)
codeSTRINGYESBranch code
endTimestampINTEGERYESEnd timestamp (epoch)
startDateTimeSTRINGYESStart datetime (string format)
endDateTimeSTRINGYESEnd datetime (string format)

outstanding​

Array of STRING

Holds list of outstanding tags/identifiers associated with the stock. (e.g [SERVICE_MANAGER, MILEAGE_UPDATE]). Can be empty if there are no outstanding tags present